<div class="form">

	<?php 
		$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
			'id'=>'src-form',
			'type'=>'horizontal',
			'enableAjaxValidation'=>false,
			'htmlOptions' => array('enctype'=>'multipart/form-data', 'class'=>'well'),
		)); 
	?>

	<?php echo $form->errorSummary(Words::model()); ?>
		
		<div class="row">
			<?php echo $form->labelEx($model,'site'); ?>
			<?php $listSites = array('default'=>'Выбрать','re'=>'Время электроники','elcom'=>'ЭЛ компоненты','light'=>'Светотехника','jer'=>'ЖЭР'); ?>
			<?php echo $form->dropDownList($model,'site',$listSites); ?>				
			<?php echo $form->error(Words::model(),'site'); ?>
		</div>	
		
		<div class="row">
			<?php echo $form->labelEx($model,'src'); ?>
			<?php echo $form->textField($model,'src',array('size'=>60,'maxlength'=>300)); ?>
			<?php echo $form->error($model,'src'); ?>
		</div>	
		
		<div class="row">
			<?php echo $form->labelEx($model,'manager'); ?>
			<?php $listManagers = array('default'=>'Выбрать','popova'=>'Попова','denisov'=>'Денисов','jivova'=>'Живова'); ?>
			<?php echo $form->dropDownList($model,'manager',$listManagers); ?>			
			<?php echo $form->error($model,'manager'); ?>
		</div>	

		<div class="row">
			<?php echo '<div style="margin:10px 0 15px 0;"><label style="display:inline;">Включено&nbsp;&nbsp;</label>' . $form->checkBox($model,'active',array('checked'=>'checked')) . "</div>"; ?>
			<?php echo $form->error($model,'active'); ?>
		</div>

		<div class="row">
			<?php echo $form->labelEx($model,'d_start'); ?>
			<?php 
				$this->widget('zii.widgets.jui.CJuiDatePicker',array(
					'name'=>'d_start',
					'model' => $model,
					'attribute' => 'd_start',
					'language' => 'ru',
					'options'=>array(
						'showAnim'=>'fold',
					),
					'htmlOptions'=>array(
						'style'=>'height:20px;'
					),
				)); 
			?>
			<?php echo $form->error($model,'d_start'); ?>
		</div>

		<div class="row">
			<?php echo $form->labelEx($model,'d_end'); ?>
			<?php 
				$this->widget('zii.widgets.jui.CJuiDatePicker',array(
					'name'=>'d_end',
					'model' => $model,
					'attribute' => 'd_end',
					'language' => 'ru',
					'options'=>array(
						'showAnim'=>'fold',
					),
					'htmlOptions'=>array(
						'style'=>'height:20px;'
					),
				)); 
			?>			
			<?php echo $form->error($model,'d_end'); ?>
		</div>

	<!-- ----------- -->	
	
	<br/><br/>
	<span>
		<?php 
			$this->widget('bootstrap.widgets.TbButton', array(
				'label' => $model->isNewRecord ? 'Создать' : 'Сохранить',
				'buttonType' => 'submit',
				'size' => 'Normal', 
				'htmlOptions'=>array('id'=>'addsrc','name'=>'addsrc'),
			));
			echo "&nbsp;";
			$this->widget('bootstrap.widgets.TbButton', array(
				'label' => 'Отмена',
				'size' => 'Normal', 
				'url'=>array('admin'),
			));
		?>			
	</span>
	<span id="add-button">
		<?php 
			if ($model->isNewRecord) {
				$this->widget('bootstrap.widgets.TbButton', array(
					'label' => 'Добавить слова',
					'buttonType' => 'submit',
					'size' => 'Normal', 
					'htmlOptions'=>array('id'=>'addword','name'=>'addword'),
				));
			}
		?>
	</span>		

<?php $this->endWidget(); ?>

	<!-- ----------- -->	
	<script type="text/javascript"></script>

</div><!-- form -->